
public class ElementList extends Expr {
	private Sequence seq;
	
	public ElementList() {
		seq = new Sequence();
	}
	
	public ElementList(Sequence seq) {
		this.seq = seq;
	}
	
	public Sequence getSequence() {
		return seq;
	}
	
	@Override
	public String toString() {
		StringBuilder toStringBuilder = new StringBuilder("[");
		
		for (Element element : seq.getElements()) {
			toStringBuilder.append(element).append(",");
		}
		
		if (toStringBuilder.length() > 1) {
			toStringBuilder.replace(toStringBuilder.length() - 1, toStringBuilder.length(), "]");
		} else {
			toStringBuilder.append("]");
		}
		
		return toStringBuilder.toString();
	}
	
	public ElementList clone() {
		ElementList newElementList = new ElementList();
		
		newElementList.seq = seq.clone();
		
		return newElementList;
	}
}
